﻿<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>西安奥德石油工程技术有限责任公司</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<link rel="shortcut icon" href="image/favicons.ico" type="image/x-icon" />
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<meta name="viewport" content="width=device-width, initial-scale=1" />
		<link rel="stylesheet" href=" css/index.css">
		<link rel="stylesheet" href=" css/top.css">
		<link rel="stylesheet" href=" css/mjgk.css">
		<link rel="stylesheet"
			href=" framework/bootstrap-3.0.0/css/bootstrap.css">
		<link rel="stylesheet"
			href=" framework/bootstrap-3.0.0/css/bootstrap.min.css">
		<link rel="stylesheet"
			href=" framework/bootstrap-3.0.0/css/bootstrap-theme.css">
		<link href=" framework/bootstrap-3.0.0/css/bootstrap-combined.min.css"
			rel="stylesheet">
		<script type="text/javascript" src=" js/jquery.js"></script>
		<style type="text/css">
<meta http-equiv=“X-UA-Compatible” content=“IE=7″>
<meta http-equiv=“X-UA-Compatible” content=“IE=8″>
<!–[if lt IE 7]>
<script src=”http://ie7-js.googlecode.com/svn/version/2.0(beta)/IE7.js” type=”text/javascript”></script>
<![endif]–>

<!–[if lt IE 8]>
<script src=”http://ie7-js.googlecode.com/svn/version/2.0(beta)/IE8.js” type=”text/javascript”></script>
<![endif]–>

<!–[if lt IE 9]>
<script src=”http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js”></script>
<![endif]–>
a {
	text-decoration: none;
	color: black !important;
}

a:hover {
	text-decoration: none;
	color: #da2b0c !important;
}
</style>
		<script>
	window.onload=function(){
		var tab = document.getElementById("tab");
		var th = tab.getElementsByTagName("th");
		var td = tab.getElementsByTagName("h4");
		for(var i = 0; i <　th.length; i ++){
			th[i].index = i;
			th[i].onclick=function(){
				for(var i = 0; i < th.length; i ++){
					th[i].className = "";
					td[i].style.display = "none";
				}
				this.className = "active";
				td[this.index].style.display = "block";
			}
		}
	}
</script>
<script type="text/javascript">
		$(document).ready(function(){
			var show_per_page = 8; 
			var number_of_items = $('#content').children().size();
			var number_of_pages = Math.ceil(number_of_items/show_per_page);
			$('#current_page').val(0);
			$('#show_per_page').val(show_per_page);
			var navigation_html = '<center><a class="previous_link" href="javascript:previous();">上一页</a>';
			var current_link = 0;
			while(number_of_pages > current_link){
				navigation_html += '<a class="page_link" href="javascript:go_to_page(' + current_link +')" longdesc="' + current_link +'">'+ (current_link + 1) +'</a>';
				current_link++;
			}
			navigation_html += '<a class="next_link" href="javascript:next();">下一页</a></center>';
			$('#page_navigation').html(navigation_html);
			$('#page_navigation .page_link:first').addClass('active_page');
			$('#content').children().css('display', 'none');
			$('#content').children().slice(0, show_per_page).css('display', 'block');	
		});
		function previous(){
			new_page = parseInt($('#current_page').val()) - 1;
			if($('.active_page').prev('.page_link').length==true){
				go_to_page(new_page);
			}
		}
		function next(){
			new_page = parseInt($('#current_page').val()) + 1;
			//if there is an item after the current active link run the function
			if($('.active_page').next('.page_link').length==true){
				go_to_page(new_page);
			}
		}
		function go_to_page(page_num){
			var show_per_page = parseInt($('#show_per_page').val());
			start_from = page_num * show_per_page;
			end_on = start_from + show_per_page;
			$('#content').children().css('display', 'none').slice(start_from, end_on).css('display', 'block');
			$('.page_link[longdesc=' + page_num +']').addClass('active_page').siblings('.active_page').removeClass('active_page');
			$('#current_page').val(page_num);
		}
		</script>
		<style>
#page_navigation a {
	padding: 3px;
	border: 1px solid gray;
	margin: 2px;
	color: black;
	text-decoration: none
}

.active_page {
	background: darkblue;
	color: white !important;
}
</style>
	</head>

	<body style="background-color: #eeeeee; font-family: Microsoft YaHei;">
		<div style="top: 0px;"><jsp:include page="top.jsp"></jsp:include></div>
		<div>
			<img src="images/13.png" width="100%" />
		</div>
		<div style="margin-left: 12%; margin-top: 1.5%;">
			<a href="front/index"> 首页</a> >
			<a href="front/jishu">技术交流</a>
			<br>
			<br>
		</div>
		<div class="show">

			<div id="tab">
				<table width="100%">
					<tr>
					<!--<c:forEach items="${all}" var="t">
						<th class="th cursor-pointer text-center active">
							${t.type}
						</th>
					</c:forEach>-->
						<th class="th cursor-pointer text-center">
							科研机构
						</th>

						<th class="th cursor-pointer text-center">
							科研成果
						</th>

						<th class="th cursor-pointer text-center">
							研发动态
						</th>

						<th class="th cursor-pointer text-center active">
							典型案例
						</th>
					</tr>
				</table>
				<h4>
					<c:forEach items="${one}" var="one">


						<div class="content">

							${one.content }
						</div>

					</c:forEach>
				</h4>
				<h4>
				<input type='hidden' id='current_page' />
			<input type='hidden' id='show_per_page' />
			<div id='content'>
					<c:forEach items="${two}" var="two">

						<ul>
							<li style="list-style: none;">
								<div class="tit">
									●
									<a href="front/jsinfo?id=${two.id }"> ${two.title }</a>
								</div>
								<div class="time">
									${two.time }
								</div>
								<br>
							</li>
						</ul>

					</c:forEach></div>
				</h4>
				<h4>
				<input type='hidden' id='current_page' />
			<input type='hidden' id='show_per_page' />
			<div id='content'>
					<c:forEach items="${three}" var="three">

						<ul>
							<li style="list-style: none;">
								<div class="tit">
									●
									<a href="front/jsinfo?id=${three.id }"> ${three.title }</a>
								</div>
								<div class="time">
									${three.time }
								</div>
								<br>
							</li>
						</ul>
					</c:forEach></div>
				</h4>
				<h4 style="display: block;">
				<input type='hidden' id='current_page' />
			<input type='hidden' id='show_per_page' />
			<div id='content'>
					<c:forEach items="${four}" var="four">

						<ul>
							<li style="list-style: none;">
								<div class="tit">
									●
									<a href="front/jsinfo?id=${four.id }"> ${four.title }</a>
								</div>
								<div class="time">
									${four.time }
								</div>
								<br>
							</li>
						</ul>

					</c:forEach></div>
				</h4>
			</div>
		</div>

		<div class="footer"><jsp:include page="bottom.jsp" flush="true"></jsp:include></div>
	</body>
	<script src="http://cdn.bootcss.com/jquery/1.11.2/jquery.min.js"></script>
	<script
		src="http://cdn.bootcss.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
	<script>
	$(document).ready(function() {
		$('#myCarousel').carousel();
	});
</script>
</html>
